package com.ce.webframework.sec.dao.impl;

import java.util.ArrayList;
import java.util.List;

import org.hibernate.Query;

import com.ce.webframework.sec.dao.ISecDictDao;
import com.ce.webframework.sec.model.SecDictDO;
import com.sitechasia.webx.core.dao.hibernate3.HibernateDomainObjectDao;

public class SecDictDaoImpl extends HibernateDomainObjectDao<SecDictDO> implements ISecDictDao{


	/**
	 * 功能描述:根据字典类型查找,对应的字典列表
	 *
	 * @param dictType
	 *            字典类型
	 * @return List<SecDictDO> 对象
	 *
	 *           返回符合条件的查询对象列表
	 */

	public List<SecDictDO> getSecDictList(String dictType){

		 String  hql=" FROM SecDictDO dic WHERE dic.dictType='"+dictType+"'";
		 Query query=getSession().createQuery(hql);
//		 query.setParameter(0, dictType);
		 List dicList= query.list();
			if (dicList == null || dicList.size() == 0) {
				return new ArrayList<SecDictDO>();
			}
			return dicList;
	}



}
